BUILD_ID=dontkillme
service=im
version=1.0
#git pull
git pull origin dev
#mvn package
mvn package -Dmaven.test.skip=true -f ../pom.xml
# shellcheck disable=SC2006
# shellcheck disable=SC2009
pid=`ps -ef | grep "$service".jar  | grep -v grep | awk '{print $2}'`
if [ -n "$pid" ]
then
   echo "kill -9 的pid:" "$pid"
   kill -9 "$pid"
fi

nohup java -Xmx256m -jar ../"$service"/target/"$service"-"$version".jar 2>&1 &
